package com.arvato;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

// springboot启动类
@SpringBootApplication
// 开启mybatis事务管理 在service层加上@Transaction 就可以生效
@EnableTransactionManagement
// 指定Springboot的mapper扫描范围
@MapperScan(basePackages = {"com.arvato.wxwork","com.arvato.right","com.arvato.minipro"})
// 开启定时任务
@EnableScheduling
@ServletComponentScan
public class LaRochePosayApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
    	// 启动类
        SpringApplication.run(LaRochePosayApplication.class, args);
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(LaRochePosayApplication.class);
    }
}